<script>

    $(document).ready(function () {

        //hide a div after 3 seconds
        setTimeout(function(){ $(".information-box, .error-box").fadeOut(); }, 3000);

    });

    function subform(){
        $('#kform').submit();
    }
    
    function checkAll()
    {
        $('#table-select-all').attr('onclick','uncheckAll();');
    	var field=document.forms.kform;
        for (i = 0; i < field.length; i++)
    	field[i].checked = true ;
    }
    
    function uncheckAll()
    {
        $('#table-select-all').attr('onclick','checkAll();')
    	var field=document.forms.kform;
        for (i = 0; i < field.length; i++)
    	field[i].checked = false ;
    }

    
  $(document).ready(function() {
                        $("#kform").validate({
                    			rules: {
                    				/*bill_no: {
                    					required: true,
                    					minlength: 3,
                    					maxlength: 200
                    				},*/
                                    name: {
                    					required: true,					
                    				}/*,
                    				description: {
                    					required: true,					
                    				}*/
                    			},
                    			messages: {
                    				/*bill_no: {
                    					required: "Please Enter Bill Number",
                                                            minlength: "Bill Number must consist of at least 3 characters"
                    				},*/
                                    name: {
                    					required: "Please Enter Name Department"					
                    				}/*,
                    				description: {
                    					required: "Please Enter Description"
                    				}   */                 				
                    			}
                    		});
                      })   
    



</script>